/**
 * @description: 单位相关
 * @fileName: unit
 * @author: luhuixu
 * @date: 2023/6/6-13:10
 * @version: V1.0.0
 **/
import request from '@/utils/request'
import routes from '@/api/gateway-routes'

/** 查询单位树 */
export function getUnitInfoTree() {
  return request({
    url: `${routes.auth}/unitInfo/getUnitInfoTree`,
    method: 'get'
  })
}

/** 查询一个单位的子级单位 */
export function queryChildrenUnit(unitId) {
  return request({
    url: `${routes.auth}/unitInfo/queryChildrenUnit`,
    method: 'get',
    params: { unitId }
  })
}
